#ifndef HEADERS_DEBUG
#define HEADERS_DEBUG

#include <stdio.h>

/*
 * These give a convenient way to throw debug messages into the code. More importantly, they are greppable.
 */
#define WHERESTR "\e[0;35m%s \e[1;31m(line %d) \e[0m"
#define WHEREARG __FILE__, __LINE__
#define DEBUG2(...) fprintf(stderr, __VA_ARGS__)
#define DEBUG(_fmt) DEBUG2(WHERESTR _fmt, WHEREARG)
#define DEBUGF(_fmt, ...) DEBUG2(WHERESTR _fmt, WHEREARG, __VA_ARGS__)

#endif
